import fetch from 'common/src/utils/fetch'
// let apiPrefix = '/dev';
let apiPrefix = '/api/arrangementservice/';

/**
 * 分页查询
 * @param {data} data
 */
export function findListPage(data) {
  return fetch({
    url: apiPrefix + 'noRequiredProgressCourse/page',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}

/**
 * 新增
 */
export function addNoRequireProgressCourse(data) {
  return fetch({
    url:apiPrefix + 'noRequiredProgressCourse/addNoRequireProgressCourse',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}

/**
 * 修改
 * @param data
 */
export function updateNoRequireProgressCourse(data) {
  return fetch({
    url:apiPrefix + 'noRequiredProgressCourse/updateNoRequireProgressCourse',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })

  /**
   *批量修改状态
   */
}export function updateList(data) {
  return fetch({
    url:apiPrefix + 'noRequiredProgressCourse/updateList',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}

/**
 * 查询
 * @param data
 */
export function getNoRequireProgressCourseById(id) {
  return fetch({
    url:apiPrefix + 'noRequiredProgressCourse/getNoRequireProgressCourseById?id='+id,
    method: 'get'
  })
}

/**
 * 删除
 * @param id
 */
export function deleteNoRequireProgressCourse(id) {
  return fetch({
    url:apiPrefix + 'noRequiredProgressCourse/deleteNoRequireProgressCourse?id='+id,
    method: 'get'
  })
}


export default {
  findListPage,
  addNoRequireProgressCourse,
  updateNoRequireProgressCourse,
  updateList,
  deleteNoRequireProgressCourse,
  getNoRequireProgressCourseById
}


